python3Packages.tree-sitter: run tests by using GH source#450602
python3Packages.tree-sitter: run tests by using GH source#450602doronbehar merged 2 commits intoNixOS:masterfrom
Conversation
|
|
|
17b8494 to
50ab9d4
Compare
|
MattSturgeon
left a comment
There was a problem hiding this comment.
With nearly 800 rebuilds, it might be worth targeting staging. We can probably get away with master if there's some urgency.
The diff SGTM though.
| # No tests in the pypi source | ||
| doCheck = false; |
There was a problem hiding this comment.
Fetching from github would also be fine, probably preferable. Assuming it has the required tag.
I only used fetchPypi because it matched what the base package was using at the time.
There was a problem hiding this comment.
I can do this in a dedicated PR if preferred.
There was a problem hiding this comment.
@MattSturgeon I tried to use the GH src, and the tests failed with:
pytest flags: -m pytest -k not\ \(test_dot_graphs\)
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0
rootdir: /build/source
configfile: pyproject.toml
collected 59 items / 1 deselected / 58 selected
tests/test_language.py ...........F. [ 22%]
tests/test_lookahead_iterator.py F [ 24%]
tests/test_node.py FFFFF..FFFFFFFF [ 50%]
tests/test_parser.py .F.FFFFF.F.FFFF [ 75%]
tests/test_query.py FFFatal Python error: Segmentation fault
Current thread 0x00007ffff7603740 (most recent call first):
File "/build/source/tests/test_query.py", line 36 in test_errors
File "/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/lib/python3.13/unittest/case.py", line 606 in _callTestMethod
File "/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/lib/python3.13/unittest/case.py", line 651 in run
File "/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/lib/python3.13/unittest/case.py", line 707 in __call__
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/unittest.py", line 351 in runtest
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 178 in pytest_runtest_call
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 246 in <lambda>
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 344 in from_call
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 245 in call_and_report
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 136 in runtestprotocol
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/runner.py", line 117 in pytest_runtest_protocol
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/main.py", line 367 in pytest_runtestloop
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/main.py", line 343 in _main
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/main.py", line 289 in wrap_session
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/main.py", line 336 in pytest_cmdline_main
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_callers.py", line 121 in _multicall
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_manager.py", line 120 in _hookexec
File "/nix/store/r6hw28r6vk1fsjdrcxwaq2wrag55ya45-python3.13-pluggy-1.6.0/lib/python3.13/site-packages/pluggy/_hooks.py", line 512 in __call__
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/config/__init__.py", line 175 in main
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201 in console_main
File "/nix/store/d6y9727qjl6j7di0298hyrnx9ns5dnpb-python3.13-pytest-8.4.1/lib/python3.13/site-packages/pytest/__main__.py", line 9 in <module>
File "<frozen runpy>", line 88 in _run_code
File "<frozen runpy>", line 198 in _run_module_as_main
Extension modules: tree_sitter_html._binding, tree_sitter_javascript._binding, tree_sitter_json._binding, tree_sitter_python._binding, tree_sitter_rust._binding (total: 5)
/nix/store/4xc7205b2pzc57r69i8vr2x7d5ww1qq3-pytest-check-hook/nix-support/setup-hook: line 23: 225 Segmentation fault (core dumped) /nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/bin/python3.13 "${flagsArray[@]}"
There was a problem hiding this comment.
Previously a patch was required to avoid segmentation fault (removed in 44da303), but it only affected aarch64-linux, and most likely got obsolete after a gcc bump (#437833 (comment)).
Applying that patch doesn't fix this segfault, I don't have other ideas why it happens.
There was a problem hiding this comment.
Played around with this a bit locally. Disabling the segfaulting test reveals why the other tests are failing:
ValueError: Incompatible Language version 15. Must be between 13 and 14
Which comes from: https://github.com/tree-sitter/py-tree-sitter/blob/v0.24.0/tree_sitter/binding/parser.c#L362-L369
IIUC, the issue is that the tree-sitter-{python,rust,html,etc} packages in nativeCheckInputs are targeting lang v15 while tree-sitter 0.24.0 is built for lang v14. (Would it be appropriate to override TREE_SITTER_LANGUAGE_VERSION? Or disable these tests?)
Local diff
diff --git a/pkgs/development/python-modules/keymap-drawer/default.nix b/pkgs/development/python-modules/keymap-drawer/default.nix
index c9ba7f129bcf..13c58a9bdbc3 100644
--- a/pkgs/development/python-modules/keymap-drawer/default.nix
+++ b/pkgs/development/python-modules/keymap-drawer/default.nix
@@ -3,7 +3,6 @@
buildPythonPackage,
fetchFromGitHub,
- fetchPypi,
pythonOlder,
nix-update-script,
@@ -20,6 +19,23 @@
}:
let
version = "0.22.1";
+
+ # keymap-drawer currently requires tree-sitter 0.24.0
+ # See https://github.com/caksoylar/keymap-drawer/issues/183
+ tree-sitter-0_24 = tree-sitter.overrideAttrs {
+ version = "0.24.0";
+ src = fetchFromGitHub {
+ owner = "tree-sitter";
+ repo = "py-tree-sitter";
+ tag = "v${tree-sitter-0_24.version}";
+ hash = "sha256-ZDt/8suteaAjGdk71l8eej7jDkkVpVDBIZS63SA8tsU=";
+ fetchSubmodules = true;
+ };
+ disabledTests = [
+ # Fatal Python error: Segmentation fault
+ "test_query"
+ ];
+ };
in
buildPythonPackage {
inherit version;
@@ -47,18 +63,7 @@ buildPythonPackage {
pydantic-settings
pyparsing
pyyaml
- # keymap-drawer currently requires tree-sitter 0.24.0
- # See https://github.com/caksoylar/keymap-drawer/issues/183
- (tree-sitter.overridePythonAttrs rec {
- version = "0.24.0";
- src = fetchPypi {
- inherit version;
- inherit (tree-sitter) pname;
- hash = "sha256-q9la9lyi9Pfso1Y0M5HtZp52Tzd0i1NSlG8A9/x45zQ=";
- };
- # No tests in the pypi source
- doCheck = false;
- })
+ tree-sitter-0_24
tree-sitter-grammars.tree-sitter-devicetree
];
Build log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing pytest-check-hook
Using pytestCheckPhase
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/0pan1fvdkk4s5ggiypvkvwaxgnyxrz56-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/tree_sitter/py.typed"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing pypaBuildPhase
Creating a wheel...
pypa build flags: --no-isolation --outdir dist/ --wheel
* Getting build dependencies for wheel...
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running egg_info
creating tree_sitter.egg-info
writing tree_sitter.egg-info/PKG-INFO
writing dependency_links to tree_sitter.egg-info/dependency_links.txt
writing requirements to tree_sitter.egg-info/requires.txt
writing top-level names to tree_sitter.egg-info/top_level.txt
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
* Building wheel...
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/__init__.py -> build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/__init__.pyi -> build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/py.typed -> build/lib.linux-x86_64-cpython-313/tree_sitter
running build_ext
building 'tree_sitter._binding' extension
creating build/temp.linux-x86_64-cpython-313/tree_sitter/binding
creating build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/language.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/language.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/lookahead_iterator.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_iterator.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/lookahead_names_iterator.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_names_iterator.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/module.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/module.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/node.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/node.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/parser.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/parser.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/query.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/query_predicates.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query_predicates.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/range.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/range.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/tree.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/tree_cursor.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree_cursor.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/core/lib/src/lib.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src/lib.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-util-linux-minimal-2.41.1-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.8.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.50.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.7.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bluez-headers-5.83/lib -L/nix/store/jf2x6y1rd5grkhjz7yxjkyc6zylkr50v-tzdata-2025b/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.26-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.3p1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-util-linux-minimal-2.41.1-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.8.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.50.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.7.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bluez-headers-5.83/lib -L/nix/store/jf2x6y1rd5grkhjz7yxjkyc6zylkr50v-tzdata-2025b/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.26-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.3p1/lib build/temp.linux-x86_64-cpython-313/tree_sitter/binding/language.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_iterator.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_names_iterator.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/module.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/node.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/parser.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query_predicates.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/range.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree_cursor.o build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src/lib.o -L/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/lib -o build/lib.linux-x86_64-cpython-313/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/__init__.py -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/__init__.pyi -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/py.typed -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/./tree_sitter
running install_egg_info
running egg_info
writing tree_sitter.egg-info/PKG-INFO
writing dependency_links to tree_sitter.egg-info/dependency_links.txt
writing requirements to tree_sitter.egg-info/requires.txt
writing top-level names to tree_sitter.egg-info/top_level.txt
reading manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
Copying tree_sitter.egg-info to build/bdist.linux-x86_64/wheel/./tree_sitter-0.24.0-py3.13.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/tree_sitter-0.24.0.dist-info/WHEEL
creating '/build/source/dist/.tmp-xeq9n3ek/tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'tree_sitter/__init__.py'
adding 'tree_sitter/__init__.pyi'
adding 'tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so'
adding 'tree_sitter/py.typed'
adding 'tree_sitter-0.24.0.dist-info/licenses/LICENSE'
adding 'tree_sitter-0.24.0.dist-info/METADATA'
adding 'tree_sitter-0.24.0.dist-info/WHEEL'
adding 'tree_sitter-0.24.0.dist-info/top_level.txt'
adding 'tree_sitter-0.24.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished creating a wheel...
Finished executing pypaBuildPhase
Running phase: pythonRuntimeDepsCheckHook
@nix { "action": "setPhase", "phase": "pythonRuntimeDepsCheckHook" }
Executing pythonRuntimeDepsCheck
Checking runtime dependencies for tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished executing pythonRuntimeDepsCheck
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
Executing pypaInstallPhase
Successfully installed tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished executing pypaInstallPhase
Running phase: pythonOutputDistPhase
@nix { "action": "setPhase", "phase": "pythonOutputDistPhase" }
Executing pythonOutputDistPhase
Finished executing pythonOutputDistPhase
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
shrinking RPATHs of ELF executables and libraries in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0
shrinking /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0/lib/python3.13/site-packages/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so
checking for references to /build/ in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0...
patching script interpreter paths in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0
stripping (with command strip and flags -S -p) in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0/lib
shrinking RPATHs of ELF executables and libraries in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist
checking for references to /build/ in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist...
patching script interpreter paths in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
Running phase: installCheckPhase
@nix { "action": "setPhase", "phase": "installCheckPhase" }
no Makefile or custom installCheckPhase, doing nothing
Running phase: pythonCatchConflictsPhase
@nix { "action": "setPhase", "phase": "pythonCatchConflictsPhase" }
Running phase: pythonRemoveBinBytecodePhase
@nix { "action": "setPhase", "phase": "pythonRemoveBinBytecodePhase" }
Running phase: pythonImportsCheckPhase
@nix { "action": "setPhase", "phase": "pythonImportsCheckPhase" }
Executing pythonImportsCheckPhase
Check whether the following modules can be imported: tree_sitter
Running phase: pytestCheckPhase
@nix { "action": "setPhase", "phase": "pytestCheckPhase" }
Executing pytestCheckPhase
pytest flags: -m pytest -k not\ \(test_query\)
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0
rootdir: /build/source
configfile: pyproject.toml
collecting ...
collected 59 items / 12 deselected / 47 selected
tests/test_language.py ...........F [ 25%]
tests/test_lookahead_iterator.py F [ 27%]
tests/test_node.py FFFFF..FFFFFFFF [ 59%]
tests/test_parser.py .FF.FFFFF.F.FFFF [ 93%]
tests/test_tree.py FFF [100%]
=================================== FAILURES ===================================
_________________________ TestLanguage.test_properties _________________________
self = <tests.test_language.TestLanguage testMethod=test_properties>
def test_properties(self):
lang = Language(self.python)
> self.assertEqual(lang.version, 14)
E AssertionError: 15 != 14
tests/test_language.py:26: AssertionError
________________ TestLookaheadIterator.test_lookahead_iterator _________________
self = <tests.test_lookahead_iterator.TestLookaheadIterator testMethod=test_lookahead_iterator>
def test_lookahead_iterator(self):
> parser = Parser(self.rust)
^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_lookahead_iterator.py:14: ValueError
_______________________ TestNode.test_child_by_field_id ________________________
self = <tests.test_node.TestNode testMethod=test_child_by_field_id>
def test_child_by_field_id(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:45: ValueError
______________________ TestNode.test_child_by_field_name _______________________
self = <tests.test_node.TestNode testMethod=test_child_by_field_name>
def test_child_by_field_name(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:60: ValueError
____________________________ TestNode.test_children ____________________________
self = <tests.test_node.TestNode testMethod=test_children>
def test_children(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:237: ValueError
______________________ TestNode.test_children_by_field_id ______________________
self = <tests.test_node.TestNode testMethod=test_children_by_field_id>
def test_children_by_field_id(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:68: ValueError
_____________________ TestNode.test_children_by_field_name _____________________
self = <tests.test_node.TestNode testMethod=test_children_by_field_name>
def test_children_by_field_name(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:76: ValueError
______________________ TestNode.test_field_name_for_child ______________________
self = <tests.test_node.TestNode testMethod=test_field_name_for_child>
def test_field_name_for_child(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:83: ValueError
______________________________ TestNode.test_hash ______________________________
self = <tests.test_node.TestNode testMethod=test_hash>
def test_hash(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:457: ValueError
____________________________ TestNode.test_is_extra ____________________________
self = <tests.test_node.TestNode testMethod=test_is_extra>
def test_is_extra(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:285: ValueError
_____________ TestNode.test_numeric_symbols_respect_simple_aliases _____________
self = <tests.test_node.TestNode testMethod=test_numeric_symbols_respect_simple_aliases>
def test_numeric_symbols_respect_simple_aliases(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:390: ValueError
___________________________ TestNode.test_properties ___________________________
self = <tests.test_node.TestNode testMethod=test_properties>
def test_properties(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:298: ValueError
_____________________ TestNode.test_root_node_with_offset ______________________
self = <tests.test_node.TestNode testMethod=test_root_node_with_offset>
def test_root_node_with_offset(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:91: ValueError
______________________________ TestNode.test_text ______________________________
self = <tests.test_node.TestNode testMethod=test_text>
def test_text(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:429: ValueError
______________________________ TestNode.test_tree ______________________________
self = <tests.test_node.TestNode testMethod=test_tree>
def test_tree(self):
code = b"def foo():\n bar()\n\ndef foo():\n bar()"
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:420: ValueError
__________________________ TestParser.test_dot_graphs __________________________
self = <tests.test_parser.TestParser testMethod=test_dot_graphs>
def test_dot_graphs(self):
from tempfile import TemporaryFile
new_parse = ["graph {\n", 'label="new_parse"\n', "}\n"]
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:485: ValueError
__________________________ TestParser.test_init_args ___________________________
self = <tests.test_parser.TestParser testMethod=test_init_args>
def test_init_args(self):
> parser = Parser(
language=self.python, included_ranges=[self.min_range], timeout_micros=self.timeout
)
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:35: ValueError
___________________________ TestParser.test_logging ____________________________
self = <tests.test_parser.TestParser testMethod=test_logging>
def test_logging(self):
from logging import getLogger
def logger(log_type: LogType, message: str):
match log_type:
case LogType.PARSE:
parse_logger.info(message)
case LogType.LEX:
lex_logger.info(message)
parse_logger = getLogger("tree_sitter.PARSE")
lex_logger = getLogger("tree_sitter.LEX")
> parser = Parser(self.python, logger=logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:472: ValueError
_________________________ TestParser.test_parse_buffer _________________________
self = <tests.test_parser.TestParser testMethod=test_parse_buffer>
def test_parse_buffer(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:114: ValueError
________________________ TestParser.test_parse_callback ________________________
self = <tests.test_parser.TestParser testMethod=test_parse_callback>
def test_parse_callback(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:123: ValueError
____________________ TestParser.test_parse_invalid_encoding ____________________
self = <tests.test_parser.TestParser testMethod=test_parse_invalid_encoding>
def test_parse_invalid_encoding(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:162: ValueError
_____________________ TestParser.test_parse_utf16_encoding _____________________
self = <tests.test_parser.TestParser testMethod=test_parse_utf16_encoding>
def test_parse_utf16_encoding(self):
source_code = bytes("'😎' && '🐍'", "utf16")
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:147: ValueError
_____________ TestParser.test_parse_with_included_range_boundaries _____________
self = <tests.test_parser.TestParser testMethod=test_parse_with_included_range_boundaries>
def test_parse_with_included_range_boundaries(self):
source_code = b"a <%= b() %> c <% d() %>"
range1_start_byte = source_code.index(b" b() ")
range1_end_byte = range1_start_byte + len(b" b() ")
range2_start_byte = source_code.index(b" d() ")
range2_end_byte = range2_start_byte + len(b" d() ")
> parser = Parser(
self.javascript,
included_ranges=[
Range(
start_byte=range1_start_byte,
end_byte=range1_end_byte,
start_point=(0, range1_start_byte),
end_point=(0, range1_end_byte),
),
Range(
start_byte=range2_start_byte,
end_byte=range2_end_byte,
start_point=(0, range2_start_byte),
end_point=(0, range2_end_byte),
),
],
)
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:291: ValueError
_____________ TestParser.test_parse_with_multiple_included_ranges ______________
self = <tests.test_parser.TestParser testMethod=test_parse_with_multiple_included_ranges>
def test_parse_with_multiple_included_ranges(self):
source_code = b"html `<div>Hello, ${name.toUpperCase()}, it's <b>${now()}</b>.</div>`"
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:189: ValueError
________________ TestParser.test_parse_with_one_included_range _________________
self = <tests.test_parser.TestParser testMethod=test_parse_with_one_included_range>
def test_parse_with_one_included_range(self):
source_code = b"<span>hi</span><script>console.log('sup');</script>"
parser = Parser(self.html)
html_tree = parser.parse(source_code)
script_content_node = html_tree.root_node.child(1).child(1)
self.assertIsNotNone(script_content_node)
self.assertEqual(script_content_node.type, "raw_text")
parser.included_ranges = [script_content_node.range]
> parser.language = self.javascript
^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:175: ValueError
_____________ TestParser.test_parsing_with_a_newly_included_range ______________
self = <tests.test_parser.TestParser testMethod=test_parsing_with_a_newly_included_range>
def test_parsing_with_a_newly_included_range(self):
source_code = b"<div><%= foo() %></div><span><%= bar() %></span><%= baz() %>"
range1_start = source_code.index(b" foo")
range2_start = source_code.index(b" bar")
range3_start = source_code.index(b" baz")
range1_end = range1_start + 7
range2_end = range2_start + 7
range3_end = range3_start + 7
# Parse only the first code directive as JavaScript
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:410: ValueError
___________________________ TestParser.test_setters ____________________________
self = <tests.test_parser.TestParser testMethod=test_setters>
def test_setters(self):
parser = Parser()
with self.subTest(setter="language"):
> parser.language = self.python
^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:46: ValueError
_________________________ TestTree.test_changed_ranges _________________________
self = <tests.test_tree.TestTree testMethod=test_changed_ranges>
def test_changed_ranges(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:55: ValueError
______________________________ TestTree.test_edit ______________________________
self = <tests.test_tree.TestTree testMethod=test_edit>
def test_edit(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:16: ValueError
______________________________ TestTree.test_walk ______________________________
self = <tests.test_tree.TestTree testMethod=test_walk>
def test_walk(self):
> parser = Parser(self.rust)
^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:78: ValueError
=========================== short test summary info ============================
FAILED tests/test_language.py::TestLanguage::test_properties - AssertionError: 15 != 14
FAILED tests/test_lookahead_iterator.py::TestLookaheadIterator::test_lookahead_iterator - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_child_by_field_id - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_child_by_field_name - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children_by_field_id - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children_by_field_name - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_field_name_for_child - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_hash - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_is_extra - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_numeric_symbols_respect_simple_aliases - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_properties - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_root_node_with_offset - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_text - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_tree - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_dot_graphs - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_init_args - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_logging - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_buffer - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_callback - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_invalid_encoding - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_utf16_encoding - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_included_range_boundaries - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_multiple_included_ranges - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_one_included_range - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parsing_with_a_newly_included_range - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_setters - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_changed_ranges - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_edit - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_walk - ValueError: Incompatible Language version 15. Must be between 13 and 14
================= 30 failed, 17 passed, 12 deselected in 0.79s =================
I'm unsure whether these are issues with the test suite or if the test suite is actually catching issues with how I'm pinning 0.24.0.
If I understand the 21c5e94 commit message correctly, then by sticking with fetchPypi we are keeping dependencies in sync?
There was a problem hiding this comment.
TREE_SITTER_LANGUAGE_VERSION comes from the tree-sitter submodule, so I guess we see this error when a dependency is targeting another tree-sitter version?
(Aside: how come python3Packages.tree-sitter is getting the normal tree-sitter by fetching git submodules, instead of dynamically linking against the nixpkgs package?)
I assume this is only relevant for tests, as the tests are testing against arbitrary grammars, while keymap-drawer only uses the tree-sitter-devicetree grammar.
I made the keymap-drawer overrides a bit more robust, but I failed to fully fix the issue. Your review on my approach is welcome never the less. Perhaps you'd be able to find the issue now too.
Thanks for experimenting with this!
It's strange that even with your tree-sitter-python override, we still see test failures like:
def test_properties(self):
lang = Language(self.python)
> self.assertEqual(lang.version, 14)
E AssertionError: 15 != 14
...I assume that self.python here should be the overridden tree-sitter-python grammar?
TBH, I'm not keen on overriding grammar packages that are only used in the test suite, if they aren't also needed at runtime. I think this is just needlessly increasing the build closure. As keymap-drawer only uses tree-sitter-devicetree, maybe it's best to disable unrelated tests and/or patch tests that are using an arbitrary grammar to use tree-sitter-devicetree instead. That said, I'll take any solution that ends up working 😁
To unblock this PR, I'm happy to go back to doCheck = false (or doInstallCheck = false) (or disabling only the pytestCheckPhase*) for keymap-drawer's overridden tree-sitter. Then we can merge this PR and I can investigate re-enabling the tests separately.
In this case, the best way to disable pytest may be to override nativeCheckInputs = [], since currently it only contains pytestCheckHook and grammars used by the test suite.
|
|
|
Diff looks good but i agree with targeting staging so as to not cause too many rebuilds. |
|
The amount of rebuilds is below the standard amount of rebuilds necessitating going through staging, and from my knowledge of the packages that depend on |
50ab9d4 to
3a40675
Compare
MattSturgeon
left a comment
There was a problem hiding this comment.
I'd like https://github.com/NixOS/nixpkgs/pull/450602/files#r2421308024 to be addressed, but https://github.com/NixOS/nixpkgs/pull/450602/files#r2421303699 could be done in another PR if preferred, as it feels like that's uncovering pre-existing issues.
| # No tests in the pypi source | ||
| doCheck = false; |
There was a problem hiding this comment.
Played around with this a bit locally. Disabling the segfaulting test reveals why the other tests are failing:
ValueError: Incompatible Language version 15. Must be between 13 and 14
Which comes from: https://github.com/tree-sitter/py-tree-sitter/blob/v0.24.0/tree_sitter/binding/parser.c#L362-L369
IIUC, the issue is that the tree-sitter-{python,rust,html,etc} packages in nativeCheckInputs are targeting lang v15 while tree-sitter 0.24.0 is built for lang v14. (Would it be appropriate to override TREE_SITTER_LANGUAGE_VERSION? Or disable these tests?)
Local diff
diff --git a/pkgs/development/python-modules/keymap-drawer/default.nix b/pkgs/development/python-modules/keymap-drawer/default.nix
index c9ba7f129bcf..13c58a9bdbc3 100644
--- a/pkgs/development/python-modules/keymap-drawer/default.nix
+++ b/pkgs/development/python-modules/keymap-drawer/default.nix
@@ -3,7 +3,6 @@
buildPythonPackage,
fetchFromGitHub,
- fetchPypi,
pythonOlder,
nix-update-script,
@@ -20,6 +19,23 @@
}:
let
version = "0.22.1";
+
+ # keymap-drawer currently requires tree-sitter 0.24.0
+ # See https://github.com/caksoylar/keymap-drawer/issues/183
+ tree-sitter-0_24 = tree-sitter.overrideAttrs {
+ version = "0.24.0";
+ src = fetchFromGitHub {
+ owner = "tree-sitter";
+ repo = "py-tree-sitter";
+ tag = "v${tree-sitter-0_24.version}";
+ hash = "sha256-ZDt/8suteaAjGdk71l8eej7jDkkVpVDBIZS63SA8tsU=";
+ fetchSubmodules = true;
+ };
+ disabledTests = [
+ # Fatal Python error: Segmentation fault
+ "test_query"
+ ];
+ };
in
buildPythonPackage {
inherit version;
@@ -47,18 +63,7 @@ buildPythonPackage {
pydantic-settings
pyparsing
pyyaml
- # keymap-drawer currently requires tree-sitter 0.24.0
- # See https://github.com/caksoylar/keymap-drawer/issues/183
- (tree-sitter.overridePythonAttrs rec {
- version = "0.24.0";
- src = fetchPypi {
- inherit version;
- inherit (tree-sitter) pname;
- hash = "sha256-q9la9lyi9Pfso1Y0M5HtZp52Tzd0i1NSlG8A9/x45zQ=";
- };
- # No tests in the pypi source
- doCheck = false;
- })
+ tree-sitter-0_24
tree-sitter-grammars.tree-sitter-devicetree
];
Build log
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing pypa-build-hook
Using pypaBuildPhase
Sourcing python-runtime-deps-check-hook
Using pythonRuntimeDepsCheckHook
Sourcing pypa-install-hook
Using pypaInstallPhase
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing pytest-check-hook
Using pytestCheckPhase
Running phase: unpackPhase
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking source archive /nix/store/0pan1fvdkk4s5ggiypvkvwaxgnyxrz56-source
source root is source
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file "source/tree_sitter/py.typed"
Running phase: patchPhase
@nix { "action": "setPhase", "phase": "patchPhase" }
Running phase: updateAutotoolsGnuConfigScriptsPhase
@nix { "action": "setPhase", "phase": "updateAutotoolsGnuConfigScriptsPhase" }
Running phase: configurePhase
@nix { "action": "setPhase", "phase": "configurePhase" }
no configure script, doing nothing
Running phase: buildPhase
@nix { "action": "setPhase", "phase": "buildPhase" }
Executing pypaBuildPhase
Creating a wheel...
pypa build flags: --no-isolation --outdir dist/ --wheel
* Getting build dependencies for wheel...
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running egg_info
creating tree_sitter.egg-info
writing tree_sitter.egg-info/PKG-INFO
writing dependency_links to tree_sitter.egg-info/dependency_links.txt
writing requirements to tree_sitter.egg-info/requires.txt
writing top-level names to tree_sitter.egg-info/top_level.txt
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
* Building wheel...
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:61: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
dist._finalize_license_expression()
/nix/store/yibmks4i48rxjd2z44d679881gw7p8f2-python3.13-setuptools-80.9.0/lib/python3.13/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers are deprecated.
!!
********************************************************************************
Please consider removing the following classifiers in favor of a SPDX license expression:
License :: OSI Approved :: MIT License
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
!!
self._finalize_license_expression()
running bdist_wheel
running build
running build_py
creating build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/__init__.py -> build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/__init__.pyi -> build/lib.linux-x86_64-cpython-313/tree_sitter
copying tree_sitter/py.typed -> build/lib.linux-x86_64-cpython-313/tree_sitter
running build_ext
building 'tree_sitter._binding' extension
creating build/temp.linux-x86_64-cpython-313/tree_sitter/binding
creating build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/language.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/language.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/lookahead_iterator.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_iterator.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/lookahead_names_iterator.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_names_iterator.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/module.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/module.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/node.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/node.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/parser.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/parser.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/query.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/query_predicates.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query_predicates.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/range.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/range.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/tree.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/binding/tree_cursor.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree_cursor.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -DPY_SSIZE_T_CLEAN -DTREE_SITTER_HIDE_SYMBOLS -UTREE_SITTER_FEATURE_WASM -Itree_sitter/binding -Itree_sitter/core/lib/include -Itree_sitter/core/lib/src -I/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/include/python3.13 -c tree_sitter/core/lib/src/lib.c -o build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src/lib.o -std=c11 -fvisibility=hidden -Wno-cast-function-type -Werror=implicit-function-declaration
gcc -shared -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-util-linux-minimal-2.41.1-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.8.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.50.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.7.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bluez-headers-5.83/lib -L/nix/store/jf2x6y1rd5grkhjz7yxjkyc6zylkr50v-tzdata-2025b/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.26-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.3p1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bzip2-1.0.8/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-libffi-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-util-linux-minimal-2.41.1-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-ncurses-6.5/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-xz-5.8.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-zlib-1.3.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-openssl-3.5.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-sqlite-3.50.4/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-mpdecimal-4.0.1/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-expat-2.7.2/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-bluez-headers-5.83/lib -L/nix/store/jf2x6y1rd5grkhjz7yxjkyc6zylkr50v-tzdata-2025b/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-gdbm-1.26-lib/lib -L/nix/store/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee-readline-8.3p1/lib build/temp.linux-x86_64-cpython-313/tree_sitter/binding/language.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_iterator.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/lookahead_names_iterator.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/module.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/node.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/parser.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/query_predicates.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/range.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree.o build/temp.linux-x86_64-cpython-313/tree_sitter/binding/tree_cursor.o build/temp.linux-x86_64-cpython-313/tree_sitter/core/lib/src/lib.o -L/nix/store/62fdlzq1x1ak2lsxp4ij7ip5k9nia3hc-python3-3.13.7/lib -o build/lib.linux-x86_64-cpython-313/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so
installing to build/bdist.linux-x86_64/wheel
running install
running install_lib
creating build/bdist.linux-x86_64/wheel
creating build/bdist.linux-x86_64/wheel/tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/__init__.py -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/__init__.pyi -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/py.typed -> build/bdist.linux-x86_64/wheel/./tree_sitter
copying build/lib.linux-x86_64-cpython-313/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/wheel/./tree_sitter
running install_egg_info
running egg_info
writing tree_sitter.egg-info/PKG-INFO
writing dependency_links to tree_sitter.egg-info/dependency_links.txt
writing requirements to tree_sitter.egg-info/requires.txt
writing top-level names to tree_sitter.egg-info/top_level.txt
reading manifest file 'tree_sitter.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'tree_sitter.egg-info/SOURCES.txt'
Copying tree_sitter.egg-info to build/bdist.linux-x86_64/wheel/./tree_sitter-0.24.0-py3.13.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/tree_sitter-0.24.0.dist-info/WHEEL
creating '/build/source/dist/.tmp-xeq9n3ek/tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'tree_sitter/__init__.py'
adding 'tree_sitter/__init__.pyi'
adding 'tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so'
adding 'tree_sitter/py.typed'
adding 'tree_sitter-0.24.0.dist-info/licenses/LICENSE'
adding 'tree_sitter-0.24.0.dist-info/METADATA'
adding 'tree_sitter-0.24.0.dist-info/WHEEL'
adding 'tree_sitter-0.24.0.dist-info/top_level.txt'
adding 'tree_sitter-0.24.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished creating a wheel...
Finished executing pypaBuildPhase
Running phase: pythonRuntimeDepsCheckHook
@nix { "action": "setPhase", "phase": "pythonRuntimeDepsCheckHook" }
Executing pythonRuntimeDepsCheck
Checking runtime dependencies for tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished executing pythonRuntimeDepsCheck
Running phase: installPhase
@nix { "action": "setPhase", "phase": "installPhase" }
Executing pypaInstallPhase
Successfully installed tree_sitter-0.24.0-cp313-cp313-linux_x86_64.whl
Finished executing pypaInstallPhase
Running phase: pythonOutputDistPhase
@nix { "action": "setPhase", "phase": "pythonOutputDistPhase" }
Executing pythonOutputDistPhase
Finished executing pythonOutputDistPhase
Running phase: fixupPhase
@nix { "action": "setPhase", "phase": "fixupPhase" }
shrinking RPATHs of ELF executables and libraries in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0
shrinking /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0/lib/python3.13/site-packages/tree_sitter/_binding.cpython-313-x86_64-linux-gnu.so
checking for references to /build/ in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0...
patching script interpreter paths in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0
stripping (with command strip and flags -S -p) in /nix/store/xglpryw5nfwdr5n8rgz8ihrvrfqdq4fv-python3.13-tree-sitter-0.24.0/lib
shrinking RPATHs of ELF executables and libraries in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist
checking for references to /build/ in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist...
patching script interpreter paths in /nix/store/z4g3mn8h47zv8vak0wd96mb60iisk98n-python3.13-tree-sitter-0.24.0-dist
Executing pythonRemoveTestsDir
Finished executing pythonRemoveTestsDir
Running phase: installCheckPhase
@nix { "action": "setPhase", "phase": "installCheckPhase" }
no Makefile or custom installCheckPhase, doing nothing
Running phase: pythonCatchConflictsPhase
@nix { "action": "setPhase", "phase": "pythonCatchConflictsPhase" }
Running phase: pythonRemoveBinBytecodePhase
@nix { "action": "setPhase", "phase": "pythonRemoveBinBytecodePhase" }
Running phase: pythonImportsCheckPhase
@nix { "action": "setPhase", "phase": "pythonImportsCheckPhase" }
Executing pythonImportsCheckPhase
Check whether the following modules can be imported: tree_sitter
Running phase: pytestCheckPhase
@nix { "action": "setPhase", "phase": "pytestCheckPhase" }
Executing pytestCheckPhase
pytest flags: -m pytest -k not\ \(test_query\)
============================= test session starts ==============================
platform linux -- Python 3.13.7, pytest-8.4.1, pluggy-1.6.0
rootdir: /build/source
configfile: pyproject.toml
collecting ...
collected 59 items / 12 deselected / 47 selected
tests/test_language.py ...........F [ 25%]
tests/test_lookahead_iterator.py F [ 27%]
tests/test_node.py FFFFF..FFFFFFFF [ 59%]
tests/test_parser.py .FF.FFFFF.F.FFFF [ 93%]
tests/test_tree.py FFF [100%]
=================================== FAILURES ===================================
_________________________ TestLanguage.test_properties _________________________
self = <tests.test_language.TestLanguage testMethod=test_properties>
def test_properties(self):
lang = Language(self.python)
> self.assertEqual(lang.version, 14)
E AssertionError: 15 != 14
tests/test_language.py:26: AssertionError
________________ TestLookaheadIterator.test_lookahead_iterator _________________
self = <tests.test_lookahead_iterator.TestLookaheadIterator testMethod=test_lookahead_iterator>
def test_lookahead_iterator(self):
> parser = Parser(self.rust)
^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_lookahead_iterator.py:14: ValueError
_______________________ TestNode.test_child_by_field_id ________________________
self = <tests.test_node.TestNode testMethod=test_child_by_field_id>
def test_child_by_field_id(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:45: ValueError
______________________ TestNode.test_child_by_field_name _______________________
self = <tests.test_node.TestNode testMethod=test_child_by_field_name>
def test_child_by_field_name(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:60: ValueError
____________________________ TestNode.test_children ____________________________
self = <tests.test_node.TestNode testMethod=test_children>
def test_children(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:237: ValueError
______________________ TestNode.test_children_by_field_id ______________________
self = <tests.test_node.TestNode testMethod=test_children_by_field_id>
def test_children_by_field_id(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:68: ValueError
_____________________ TestNode.test_children_by_field_name _____________________
self = <tests.test_node.TestNode testMethod=test_children_by_field_name>
def test_children_by_field_name(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:76: ValueError
______________________ TestNode.test_field_name_for_child ______________________
self = <tests.test_node.TestNode testMethod=test_field_name_for_child>
def test_field_name_for_child(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:83: ValueError
______________________________ TestNode.test_hash ______________________________
self = <tests.test_node.TestNode testMethod=test_hash>
def test_hash(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:457: ValueError
____________________________ TestNode.test_is_extra ____________________________
self = <tests.test_node.TestNode testMethod=test_is_extra>
def test_is_extra(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:285: ValueError
_____________ TestNode.test_numeric_symbols_respect_simple_aliases _____________
self = <tests.test_node.TestNode testMethod=test_numeric_symbols_respect_simple_aliases>
def test_numeric_symbols_respect_simple_aliases(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:390: ValueError
___________________________ TestNode.test_properties ___________________________
self = <tests.test_node.TestNode testMethod=test_properties>
def test_properties(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:298: ValueError
_____________________ TestNode.test_root_node_with_offset ______________________
self = <tests.test_node.TestNode testMethod=test_root_node_with_offset>
def test_root_node_with_offset(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:91: ValueError
______________________________ TestNode.test_text ______________________________
self = <tests.test_node.TestNode testMethod=test_text>
def test_text(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:429: ValueError
______________________________ TestNode.test_tree ______________________________
self = <tests.test_node.TestNode testMethod=test_tree>
def test_tree(self):
code = b"def foo():\n bar()\n\ndef foo():\n bar()"
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_node.py:420: ValueError
__________________________ TestParser.test_dot_graphs __________________________
self = <tests.test_parser.TestParser testMethod=test_dot_graphs>
def test_dot_graphs(self):
from tempfile import TemporaryFile
new_parse = ["graph {\n", 'label="new_parse"\n', "}\n"]
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:485: ValueError
__________________________ TestParser.test_init_args ___________________________
self = <tests.test_parser.TestParser testMethod=test_init_args>
def test_init_args(self):
> parser = Parser(
language=self.python, included_ranges=[self.min_range], timeout_micros=self.timeout
)
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:35: ValueError
___________________________ TestParser.test_logging ____________________________
self = <tests.test_parser.TestParser testMethod=test_logging>
def test_logging(self):
from logging import getLogger
def logger(log_type: LogType, message: str):
match log_type:
case LogType.PARSE:
parse_logger.info(message)
case LogType.LEX:
lex_logger.info(message)
parse_logger = getLogger("tree_sitter.PARSE")
lex_logger = getLogger("tree_sitter.LEX")
> parser = Parser(self.python, logger=logger)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:472: ValueError
_________________________ TestParser.test_parse_buffer _________________________
self = <tests.test_parser.TestParser testMethod=test_parse_buffer>
def test_parse_buffer(self):
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:114: ValueError
________________________ TestParser.test_parse_callback ________________________
self = <tests.test_parser.TestParser testMethod=test_parse_callback>
def test_parse_callback(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:123: ValueError
____________________ TestParser.test_parse_invalid_encoding ____________________
self = <tests.test_parser.TestParser testMethod=test_parse_invalid_encoding>
def test_parse_invalid_encoding(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:162: ValueError
_____________________ TestParser.test_parse_utf16_encoding _____________________
self = <tests.test_parser.TestParser testMethod=test_parse_utf16_encoding>
def test_parse_utf16_encoding(self):
source_code = bytes("'😎' && '🐍'", "utf16")
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:147: ValueError
_____________ TestParser.test_parse_with_included_range_boundaries _____________
self = <tests.test_parser.TestParser testMethod=test_parse_with_included_range_boundaries>
def test_parse_with_included_range_boundaries(self):
source_code = b"a <%= b() %> c <% d() %>"
range1_start_byte = source_code.index(b" b() ")
range1_end_byte = range1_start_byte + len(b" b() ")
range2_start_byte = source_code.index(b" d() ")
range2_end_byte = range2_start_byte + len(b" d() ")
> parser = Parser(
self.javascript,
included_ranges=[
Range(
start_byte=range1_start_byte,
end_byte=range1_end_byte,
start_point=(0, range1_start_byte),
end_point=(0, range1_end_byte),
),
Range(
start_byte=range2_start_byte,
end_byte=range2_end_byte,
start_point=(0, range2_start_byte),
end_point=(0, range2_end_byte),
),
],
)
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:291: ValueError
_____________ TestParser.test_parse_with_multiple_included_ranges ______________
self = <tests.test_parser.TestParser testMethod=test_parse_with_multiple_included_ranges>
def test_parse_with_multiple_included_ranges(self):
source_code = b"html `<div>Hello, ${name.toUpperCase()}, it's <b>${now()}</b>.</div>`"
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:189: ValueError
________________ TestParser.test_parse_with_one_included_range _________________
self = <tests.test_parser.TestParser testMethod=test_parse_with_one_included_range>
def test_parse_with_one_included_range(self):
source_code = b"<span>hi</span><script>console.log('sup');</script>"
parser = Parser(self.html)
html_tree = parser.parse(source_code)
script_content_node = html_tree.root_node.child(1).child(1)
self.assertIsNotNone(script_content_node)
self.assertEqual(script_content_node.type, "raw_text")
parser.included_ranges = [script_content_node.range]
> parser.language = self.javascript
^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:175: ValueError
_____________ TestParser.test_parsing_with_a_newly_included_range ______________
self = <tests.test_parser.TestParser testMethod=test_parsing_with_a_newly_included_range>
def test_parsing_with_a_newly_included_range(self):
source_code = b"<div><%= foo() %></div><span><%= bar() %></span><%= baz() %>"
range1_start = source_code.index(b" foo")
range2_start = source_code.index(b" bar")
range3_start = source_code.index(b" baz")
range1_end = range1_start + 7
range2_end = range2_start + 7
range3_end = range3_start + 7
# Parse only the first code directive as JavaScript
> parser = Parser(self.javascript)
^^^^^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:410: ValueError
___________________________ TestParser.test_setters ____________________________
self = <tests.test_parser.TestParser testMethod=test_setters>
def test_setters(self):
parser = Parser()
with self.subTest(setter="language"):
> parser.language = self.python
^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_parser.py:46: ValueError
_________________________ TestTree.test_changed_ranges _________________________
self = <tests.test_tree.TestTree testMethod=test_changed_ranges>
def test_changed_ranges(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:55: ValueError
______________________________ TestTree.test_edit ______________________________
self = <tests.test_tree.TestTree testMethod=test_edit>
def test_edit(self):
> parser = Parser(self.python)
^^^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:16: ValueError
______________________________ TestTree.test_walk ______________________________
self = <tests.test_tree.TestTree testMethod=test_walk>
def test_walk(self):
> parser = Parser(self.rust)
^^^^^^^^^^^^^^^^^
E ValueError: Incompatible Language version 15. Must be between 13 and 14
tests/test_tree.py:78: ValueError
=========================== short test summary info ============================
FAILED tests/test_language.py::TestLanguage::test_properties - AssertionError: 15 != 14
FAILED tests/test_lookahead_iterator.py::TestLookaheadIterator::test_lookahead_iterator - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_child_by_field_id - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_child_by_field_name - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children_by_field_id - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_children_by_field_name - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_field_name_for_child - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_hash - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_is_extra - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_numeric_symbols_respect_simple_aliases - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_properties - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_root_node_with_offset - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_text - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_node.py::TestNode::test_tree - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_dot_graphs - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_init_args - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_logging - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_buffer - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_callback - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_invalid_encoding - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_utf16_encoding - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_included_range_boundaries - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_multiple_included_ranges - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parse_with_one_included_range - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_parsing_with_a_newly_included_range - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_parser.py::TestParser::test_setters - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_changed_ranges - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_edit - ValueError: Incompatible Language version 15. Must be between 13 and 14
FAILED tests/test_tree.py::TestTree::test_walk - ValueError: Incompatible Language version 15. Must be between 13 and 14
================= 30 failed, 17 passed, 12 deselected in 0.79s =================
I'm unsure whether these are issues with the test suite or if the test suite is actually catching issues with how I'm pinning 0.24.0.
If I understand the 21c5e94 commit message correctly, then by sticking with fetchPypi we are keeping dependencies in sync?
3a40675 to
b730c4a
Compare
|
@MattSturgeon I made the keymap-drawer overrides a bit more robust, but I failed to fully fix the issue. Your review on my approach is welcome never the less. Perhaps you'd be able to find the issue now too. |
5a2b89f to
eb4e4bd
Compare
|
OK I wrote a descent comment near the |
MattSturgeon
left a comment
There was a problem hiding this comment.
OK I wrote a decent comment near the
doInstallCheck = false;line in the keymap-drawer override
Great, these kinda "justification", "motivation", and "context" comments are always useful!
please verify that it functions correctly
I've tested this and it seems to be working for keymap-drawer: MattSturgeon/glove80-config#25
My review comments are now focused on understanding some of your decisions and/or suggestions for things like minor cleanup.
Also: looking back at the last nixpkgs-review, we also had build failures for python3Packages.llama-index-readers-docling, streamcontroller, and x86_64-darwin had 194 failures(!). I'm assuming these are already failing on master and aren't related to this PR?
| let | ||
|
|
||
| buildPythonPackage rec { | ||
| version = "0.22.1"; | ||
| in | ||
| buildPythonPackage { | ||
| inherit version; |
There was a problem hiding this comment.
I'd prefer if you didn't touch unrelated parts of the file
| let | |
| buildPythonPackage rec { | |
| version = "0.22.1"; | |
| in | |
| buildPythonPackage { | |
| inherit version; | |
| let | |
| version = "0.22.1"; | |
| in | |
| buildPythonPackage { | |
| inherit version; |
There was a problem hiding this comment.
This change is somewhat related, because the version attribute is not used inside an inner rec attribute set (of the tree-sitter override), and hence we can go back to the common pattern of putting the version inside the buildPythonPackage rec attribute set argument.
You might argue that putting a version inside a let in and inheriting it right afterwards is somewhat more correct (see this article), but I'd disagree if we are talking only about the version key, and the src arguments. I believe that in the near future we'll see buildPython{Package,Application} gaining the ability to process a (finalAttrs: { /*...*/ }) function argument - like stdenv.mkDerivation, and others. When that feature will be available, to discard the rec near buildPythonPackage will be much easier if the version is not defined outside in a let in.
There was a problem hiding this comment.
Ah, from the perspective of the version being moved out of a rec attrset when adding the tree-sitter override, that argument makes sense. However, this package has actually used a let instead of a rec since it was initially added.
Personally, I see using rec in large attrsets as an anti-pattern, similar to excessive use of with. The fact it is so common in the python-modules set is tech debt IMO.
Solving it in the bigger picture will require a finalAttrs fixpoint, as you point out, but I wanted this package to serve as an example of avoiding rec sets in individual packages.
There was a problem hiding this comment.
OK since it is your package, and you insist I won't mind minimizing the diff.
|
eb4e4bd to
447150a
Compare
|
I'm considering all of the review comments resolved, and will merge tomorrow (in ~8hours from now). |
MattSturgeon
left a comment
There was a problem hiding this comment.
will merge tomorrow (in ~8hours from now).
I'm happy for it to be merged immediately, or whenever you prefer.
Thanks for being patient with my questions, suggestions, and reviews!
Description of changes
Things done
nix.conf? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.